using System.Collections.Generic;

namespace Sinacor.Servico.Bovespa.ContasCorrente.Service.ServiceImplementation.Translator.BusinessEntityToDataContract 
{
	public class ContaCorrente 
    {
		public ContaCorrente(){}

        public List<DataContract.Response.HistoricoContaCorrenteResponse> ToHistoricoContaCorrenteResponse(List<BusinessEntity.HistoricoContaCorrente> entityList)
        {
            List<DataContract.Response.HistoricoContaCorrenteResponse> to = new List<Sinacor.Servico.Bovespa.ContasCorrente.Service.DataContract.Response.HistoricoContaCorrenteResponse>();

            foreach (BusinessEntity.HistoricoContaCorrente item in entityList)
            {
                to.Add(ToHistoricoContaCorrenteResponse(item));
            }

            return to; 
        }

		public DataContract.Response.HistoricoContaCorrenteResponse ToHistoricoContaCorrenteResponse(BusinessEntity.HistoricoContaCorrente entity)
        {
            Sinacor.Servico.Bovespa.ContasCorrente.Service.DataContract.Response.HistoricoContaCorrenteResponse to = new Sinacor.Servico.Bovespa.ContasCorrente.Service.DataContract.Response.HistoricoContaCorrenteResponse();

            to.Codigo = entity.Codigo;
            to.Descricao = entity.Descricao;
            to.DiasProjecao = entity.DiasProjecao;
            to.Tipo = entity.Tipo;
            return to;
        }
	}
}